import axios from 'axios';

//删除指定id的友情链接
let remove = (id, params) => axios.delete(`/link/${id}`, { params });

// 启用/禁用友情链接
let usable = (data) => axios.post('/link/usable', data);

// 添加友情链接
let add = (data) => axios.post('/link/', data);

// 编辑友情链接
let edit = (link_id, data) => axios.put(`/link/${link_id}`, data);

//  获取所有友情链接列表
let list = (params) => axios.get('/link/list', { params });

export default {
	usable,
	add,
	list,
	edit,
	remove,
}
